<?php
/**
 * Created by PhpStorm.
 * User: 小蛮哼哼哼
 * Email: 243194993@qq.com
 * Date: {2021/1/11}
 * Time: {14:26}
 * motto: 现在的努力是为了小时候吹过的牛逼！
 */

namespace app\common\model\mysql;


use think\Model;

class AdminUser extends Model
{
    /**
     * @param string $username
     * @return array|Model|null
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     */
    public function getAdminUserByAdminUser(string $username = '')
    {
        return $this->where('username', $username)
            ->where('status', config('status.mysql.table_normal'))
            ->find();
    }
}